if ((global.control == 1) and (global.inventory == false) and (global.dialog == false))
{
    if (global.cutscene == true)
    {
        switch (cutscene_action_id)
        {
            case 1:
            //Walk
            (cutscene_action_character).character_direction = (sign(cutscene_action_value[0] - (cutscene_action_character).x));
            (cutscene_action_character).character_walk = (abs((cutscene_action_character).x - cutscene_action_value[0]) > 16);
            (cutscene_action_character).character_jump = ((place_meeting((cutscene_action_character).x + ((cutscene_action_character).character_direction),(cutscene_action_character).y,obj_solid) == true) and (cutscene_action_value[1] == true));
            if (cutscene_waitforend == true)
            {
                cutscene_nextaction = ((cutscene_action_character).character_walk == false);
            }
            else
            {
                cutscene_nextaction = true;
            }
            break;
            case 2:
            //Sprint
            (cutscene_action_character).character_sprint = (cutscene_action_value[0]);
            cutscene_nextaction = true;
            break;
            case 3:
            //Jump
            if ((cutscene_action_character).character_jump != cutscene_action_value[0])
            {
                (cutscene_action_character).character_jump = (cutscene_action_value[0]);
            }
            if (cutscene_waitforend == true)
            {
                cutscene_nextaction = ((cutscene_action_character).character_jump == false);
            }
            else
            {
                cutscene_nextaction = true;
            }
            break;
            case 4:
            //Attack
            (cutscene_action_character).character_attack = (cutscene_action_value[0]);
            cutscene_nextaction = true;
            break;
            case 5:
            //Crouch
            (cutscene_action_character).character_crouch = (cutscene_action_value[0]);
            cutscene_nextaction = true;
            break;
            case 6:
            //Wait
            break;
            case 7:
            //Trigger
            break;
            case 8:
            //Variable
            break;
            case 9:
            //Dialog
            break;
        }
        if (cutscene_nextaction == true)
        {
            if (ds_list_size(global.cutscene_queue_id[0]) == 0)
            {
                global.cutscene_id = "";
                global.cutscene = false;
            }
            else
            {
                cutscene_action_dequeue();
                cutscene_nextaction = false;
            }
        }
    }
    else
    {
        if (string_length(global.cutscene_id) > 0)
        {
            var cutscene_queues_string;
            cutscene_queues_string = ds_map_find_value(global.cutscene_map, global.cutscene_id);
            for (n = 0; n < array_length_1d(global.cutscene_queue_id); n++)
            {
                global.cutscene_queue_id[n] = real(explode(n,"|",cutscene_queues_string));
            }
            cutscene_action_dequeue();
            global.cutscene = true;
        }
    }
}
